package com.yanghang.controller;

import com.yanghang.entity.Computer;
import com.yanghang.service.ComputerService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@RequestMapping("/computer")
public class ComputerController {
    private ComputerService cs;

    public ComputerService getCs() {
        return cs;
    }

    public void setCs(ComputerService cs) {
        this.cs = cs;
    }
    @RequestMapping("/selectComputerByBrandId")
    @ResponseBody
    public List<Computer>selectComputerByBrandId(@RequestParam(defaultValue = "-1") Integer bid){
        return cs.selectComputerByBrandId(bid);
    }
}
